Connect to Leonardo.Ai with the MCP Server
Connect your AI assistant to Leonardo.Ai through the Model Context Protocol (MCP). You can generate images directly or work with the Leonardo Agent on a creative project.
Before you start
To use the Leonardo.Ai Connector, you’ll need:
- An AI assistant that can use MCP servers, such as:
- Cursor
- Claude Code
- Codex
- ChatGPT
- Claude
- A Leonardo.Ai account
MCP V2 uses your Leonardo.Ai account. Generation uses personal credits by default or Team credits if a team is selected.
Connect your AI assistant
Use this server URL:
https://mcp.leonardo.ai/v2/mcpFollow the instructions for your assistant below. Complete the browser sign-in with the Leonardo.Ai account you want to use.
- Open your project's
.cursor/mcp.jsonfile. Create the file if it does not exist. - Add the following server configuration. If the file contains other servers, add this entry to its
mcpServersobject.
{
"mcpServers": {
"leonardo-ai": {
"url": "https://mcp.leonardo.ai/v2/mcp",
"auth": {
"CLIENT_ID": "cursor"
}
}
}
}- Open Cursor's MCP settings.
- Complete authentication for
leonardo-ai. - Open an Agent conversation to use the tools.
See the Cursor MCP documentation for configuration details.
- Add the server:
claude mcp add --transport http leonardo-ai https://mcp.leonardo.ai/v2/mcp- Authenticate:
claude mcp login leonardo-ai- Complete the browser sign-in.
- Run
/mcpinside Claude Code to check the connection.
See the Claude Code MCP documentation for client details.
- Add the server:
codex mcp add leonardo-ai --url https://mcp.leonardo.ai/v2/mcp- Complete the sign-in if Codex requests it. To start sign-in separately, run:
codex mcp login leonardo-ai- Complete the browser sign-in.
You can add the server as a custom connector when your Claude account permits custom connectors.
- Open Claude's Customize page.
- Select Add custom connector.
- Add a custom connector named
Leonardo.Ai. - Enter
https://mcp.leonardo.ai/v2/mcpas the server URL. - Select "Use Claude's published identity" (CIMD)
- Complete the connection and browser sign-in.
Managed accounts can restrict custom connectors. Contact your workspace administrator if the option is unavailable.
- Open ChatGPT's Plugins page.
- Search for the Leonardo.Ai plugin.
- Select "Install Plugin"
- Complete the Leonardo.Ai sign-in when prompted.

Usage
Generate Images
Ask your assistant:
Use Leonardo.Ai to create a landscape image of a coastal village at sunrise.
Generate Videos
Ask your assistant:
Use Leonardo.Ai to create a video of a card driving through a coastal village at sunrise.
Work with Leo Agent
Use Leo Agent for creative briefs, exploration, and iterative edits within a project.
A project preserves the conversation and generated assets. Continue in the same project for related work.
Ask your assistant:
Start a Leonardo Agent project for a coffee brand. Ask Leo to explore three visual directions for its packaging.
Turn one of the options into a 15-second video.
Continue the project by asking for edits:
Use the Leonardo Agent to cut the generated video down to a 10-second ad and a 6-second ad, with a music track playing underneath.
Updated 6 days ago
